package net.handler {

	import globals.Global;
	
	import net.message.BaseMessage;
	import net.message.GCUserMessage;
	
	import ui.face.ScoreFace;
	import ui.face.UserFace;

	public class UserHandler implements IMessageHandler {

		public function UserHandler() {
		}
		
		public function execute(message:BaseMessage):void {
			var um:GCUserMessage = message as GCUserMessage;
			
			var uf:UserFace = Global.uiManager.userFace;
			uf.updateName(um.username);
			uf.updateLevel(um.level);
			uf.updateExp(um.exp, 100000);
			
			var sf:ScoreFace = Global.uiManager.scoreFace;
			sf.updateGold(um.gold);
			sf.updateSilver(um.silver);
			sf.updateBadge(um.exploit);
		}
	}
}